package com.ssy.lingxi.marketing.controller.activity;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.marketing.model.vo.activity.request.*;
import com.ssy.lingxi.marketing.model.vo.activity.response.*;
import com.ssy.lingxi.marketing.service.IAdornService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * @author fhj
 * @version 2.0.0
 * @menu 装修
 * @date 2021/8/24
 */
@RestController
@RequestMapping("/marketing/adorn")
public class AdornController extends BaseController {

    @Resource
    private IAdornService adornService;

    /**
     * 平台营销活动列表（装修）
     **/
    @RequestMapping(value = "/platformActivityListAdorn", method = RequestMethod.GET)
    public Wrapper<PageData<PfActivityListAdornResp>> platformActivityListAdorn(@Valid PfActivityListAdornReq req) {
        return adornService.platformActivityListAdorn(getPlatformUser(), req);
    }

    /**
     * 商家营销活动列表（装修）
     **/
    @RequestMapping(value = "/merchantActivityListAdorn", method = RequestMethod.GET)
    public Wrapper<PageData<McActivityListAdornResp>> merchantActivityListAdorn(@Valid McActivityListAdornReq req) {
        return adornService.merchantActivityListAdorn(getSysUser(), req);
    }

    /**
     * 回显活动商品（装修）
     **/
    @RequestMapping(value = "/activityGoodsAdorn", method = RequestMethod.GET)
    public Wrapper<List<ActivityGoodsAdornResp>> activityGoodsAdorn(@Valid ActivityGoodsAdornReq req) {
        return adornService.activityGoodsAdorn(req);
    }

    /**
     * 商品列表（装修）
     **/
    @RequestMapping(value = "/goodsListAdorn", method = RequestMethod.GET)
    public Wrapper<PageData<GoodsListAdornResp>> goodsListAdorn(@Valid GoodsListAdornReq req) {
        return adornService.goodsListAdorn(req);
    }

    /**
     * 渠道商品列表（装修）
     **/
    @RequestMapping(value = "/channelGoodsListAdorn", method = RequestMethod.GET)
    public Wrapper<PageData<ChannelGoodsListAdornResp>> channelGoodsListAdorn(@Valid ChannelGoodsListAdornReq req) {
        return adornService.channelGoodsListAdorn(req);
    }
}
